<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组分隔</title>
</head>

<body>
    <script>
        var array = ["aa", "bb", "cc", "dd", "ee"];
        var str = array[0];
        var feng = '|';
        for (var i = 1; i < array.length; i++) {
            str = str + feng + array[i];
        }
        console.log(str)
    </script>

</body>

</html>